#ifndef WL_EXT_RINGBUFFER_H
#define WL_EXT_RINGBUFFER_H
#include <stdbool.h>


typedef void* ring_buffer_hdl;

void ring_buffer_init(ring_buffer_hdl *hdl, unsigned char* buf, unsigned int size);
void ring_buffer_deinit(ring_buffer_hdl hdl);
bool ring_buffer_is_empty(ring_buffer_hdl hdl);
bool ring_buffer_is_full(ring_buffer_hdl hdl);
unsigned int ring_buffer_get_count(ring_buffer_hdl hdl);
unsigned int ring_buffer_write(ring_buffer_hdl hdl, const unsigned char* data, unsigned int count);
unsigned int ring_buffer_write(ring_buffer_hdl hdl, const unsigned char* data, unsigned int count);
unsigned int ring_buffer_read(ring_buffer_hdl hdl, unsigned char* data, unsigned int count);

#endif
